import pytest
@pytest.fixture()
def a_list():
    return [1,2,3,44,5]


def test_a_list(a_list):
    assert a_list[2]==3

if __name__ == '__main__':
    pytest.main(['-vs','fixture传递测试数据.py'])